package com.ruoyi.web.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户地址溥对象 tb_address
 *
 * @author cacode
 * @date 2024-03-19
 */
@Setter
@Getter
@Accessors(chain = true)
public class TbAddress extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 地址信息 */
    @Excel(name = "地址信息")
    private String address;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String phoneNumber;

    /** 联系姓名 */
    @Excel(name = "联系姓名")
    private String userName;

    /** 性别 */
    @Excel(name = "性别")
    private Long sex;

    /** 默认地址(0=不是,1=是) */
    @Excel(name = "默认地址",readConverterExp = "0=不是,1=是")
    private Boolean isDefault;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("address", getAddress())
            .append("phoneNumber", getPhoneNumber())
            .append("userName", getUserName())
            .append("sex", getSex())
            .append("isDefault", getIsDefault())
            .toString();
    }
}
